<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>后台管理</title>
</head>
<link href="../css/style1.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../js/jhs.js"></script>
<body>
<script type="text/javascript">
    //跳转此页面，如果有参数，说明是提交后有返回消息
    var value = window.location.href;
    var arr = value.substring(value.lastIndexOf('?') + 1,value.length).split('&');
    var info = new Array();
    for(var i = 0; i < arr.length; i++){
        info[arr[i].split('=')[0]] = arr[i].split('=')[1];
    }

    if(info['error']){
        var alert_content = '';
        if(info['type']=='baicai'){alert_content+="白菜,";}
        else if(info['type']=='free'){alert_content+="免费试用,";}
        else if(info['type']=='mission'){alert_content+="佣金任务,";}
        alert_content+=info['error'];
        alert(alert_content);
    }

    function onChangeTag(menuid){
        var menu = document.getElementById("manage_menu");
        var lis = menu.getElementsByTagName("li");
        var baicai_content = document.getElementById("baicai_content");
        var free_content = document.getElementById("free_content");
        var mission_content = document.getElementById("mission_content");
        if(menuid == 0){
            baicai_content.style.display = "";
            free_content.style.display = "none";
            mission_content.style.display = "none";
        }else if(menuid == 1){
            baicai_content.style.display = "none";
            free_content.style.display = "";
            mission_content.style.display = "none";
        }else if(menuid == 2){
            baicai_content.style.display = "none";
            free_content.style.display = "none";
            mission_content.style.display = "";
        }
        for(var i = 0;i < lis.length;i++){
            if(i==menuid){lis[i].setAttribute("class","active")}
            else{lis[i].setAttribute("class","")}
        }
    }
</script>
<div id="manage_page" class="manage_page">
    <ui class="manage_tags" id="manage_menu">
        <li onclick="onChangeTag(0)" class="active">
            <div class="login_tag hover">白菜</div>
        </li>
        <li onclick="onChangeTag(1)">
            <div class="login_tag">免费试用</div>
        </li>
        <li onclick="onChangeTag(2)">
            <div class="login_tag">佣金任务</div>
        </li>
    </ui>
    <div id="baicai_content" class="manage_tag_contents">
        <form action="../behind_manage/jufuli.php" method="post" enctype="multipart/form-data">
            <div class="manage_tag_content display_inline_block">
                <input type="hidden" name="type" value="baicai">
                <p>标题:</p><input type="text" name="title">
                <p>图片:</p><input type="file" name="imgurl"><br>
                <p>劵后价格:</p><input type="text" name="news_price">
                <p>描述:</p><input type="text" name="content"><br>
                <p>url:</p><input type="text" name="url">
                <p>无:</p><input type="text"><br>
                <input type="button" onclick="javascript:window.open('jufuli.html','_self');" value="返回"> <input type="submit" value="保存">
            </div>
        </form>
    </div>
    <div id="free_content" class="manage_tag_contents" style="display: none;">
        <form action="../behind_manage/jufuli.php" method="post" enctype="multipart/form-data">
            <div class="manage_tag_content display_inline_block">
                <input type="hidden" name="type" value="free">
                <p>标题:</p><input type="text" name="title">
                <p>图片:</p><input type="file" name="imgurl"><br>
                <p>原价:</p><input type="text" name="org_price">
                <p>份数:</p><input type="text" name="copies"><br>
                <p>url:</p><input type="text" name="url">
                <p>无:</p><input type="text"><br>
                <input type="button" onclick="javascript:window.open('jufuli.html','_self');" value="返回"> <input type="submit" value="保存">
            </div>
        </form>
    </div>
    <div id="mission_content" class="manage_tag_contents" style="display: none;">
        <form action="../behind_manage/jufuli.php" method="post" enctype="multipart/form-data">
            <div class="manage_tag_content display_inline_block">
                <input type="hidden" name="type" value="mission">
                <p>标题:</p><input type="text" name="title">
                <p>图片:</p><input type="file" name="imgurl"><br>
                <p>佣金:</p><input type="text" name="mission_money">
                <p>下单价:</p><input type="text" name="pay_money"><br>
                <p>返还价:</p><input type="text" name="return_money">
                <p>份数:</p><input type="text" name="copies"><br>
                <p>结束时间:</p><input type="text" name="end_time">
                <p>url:</p><input type="text" name="url"><br>
                <input type="button" onclick="javascript:window.open('jufuli.html','_self');" value="返回"> <input type="submit" value="保存">
            </div>
        </form>
    </div>
</div>
</body>
</html>